/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package actions.facade;

import Connexion.ConnexionCustomer;
import com.opensymphony.xwork2.ActionSupport;
import java.rmi.RemoteException;
import java.util.List;
import javax.ejb.FinderException;
import miage.beans.CategoriePresentation;
import miage.sessions.ecom.remote.EcomCustomerRemote;

/**
 *
 * @author Pepito
 */
public class FacadeAction extends ActionSupport{
    protected int nbProduit;
    private EcomCustomerRemote rechercher;
    protected List<CategoriePresentation> listCategoriePresentation;
    protected List<String> listCurrencySymbols;
    
    public List<String> getListCurrencySymbols() {
        rechercher = ConnexionCustomer.connectionServerBean();
        return rechercher.getCurrencySymbols();
    }
    
    public int getNbProduit() {
        rechercher = ConnexionCustomer.connectionServerBean();
        return rechercher.nombreProduitInCart();
    }

    public void setNbProduit(int nbProduit) {
        this.nbProduit = nbProduit;
    }

    public List<CategoriePresentation> getListCategoriePresentation() throws FinderException, RemoteException {
        rechercher = ConnexionCustomer.connectionServerBean();
        listCategoriePresentation =rechercher.getAllCategorie();
        return listCategoriePresentation;
    }

    public void setListCategoriePresentation(List<CategoriePresentation> listCategoriePresentation) {
        this.listCategoriePresentation = listCategoriePresentation;
    }
    
}